.class final Lcom/burstly/lib/service/ServerConfigurationService$1;
.super Ljava/lang/Object;
.source "ServerConfigurationService.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/burstly/lib/service/ServerConfigurationService;->initService(Landroid/content/Context;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x8
    name = null
.end annotation


# instance fields
.field private final mFileHandler:Lcom/burstly/lib/persistance/ObjectSaveLoadHandler;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/burstly/lib/persistance/ObjectSaveLoadHandler",
            "<",
            "Ljava/util/HashMap",
            "<",
            "Ljava/lang/String;",
            "Ljava/lang/Object;",
            ">;>;"
        }
    .end annotation
.end field

.field final synthetic val$configurator:Ljava/util/concurrent/ThreadPoolExecutor;

.field final synthetic val$loadConfig:Ljava/lang/Runnable;


# direct methods
.method constructor <init>(Ljava/util/concurrent/ThreadPoolExecutor;Ljava/lang/Runnable;)V
    .locals 1
    .parameter
    .parameter

    .prologue
    .line 248
    iput-object p1, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->val$configurator:Ljava/util/concurrent/ThreadPoolExecutor;

    iput-object p2, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->val$loadConfig:Ljava/lang/Runnable;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 253
    sget-object v0, Lcom/burstly/lib/service/ServerConfigurationService;->sFileHandler:Lcom/burstly/lib/persistance/ObjectSaveLoadHandler;

    iput-object v0, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->mFileHandler:Lcom/burstly/lib/persistance/ObjectSaveLoadHandler;

    return-void
.end method


# virtual methods
.method public run()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 257
    sget-boolean v1, Lcom/burstly/lib/service/ServerConfigurationService;->sLoadConfig:Z

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->mFileHandler:Lcom/burstly/lib/persistance/ObjectSaveLoadHandler;

    invoke-virtual {v1}, Lcom/burstly/lib/persistance/ObjectSaveLoadHandler;->load()Ljava/io/Serializable;

    move-result-object v1

    check-cast v1, Ljava/util/HashMap;

    move-object v0, v1

    .line 258
    .local v0, saved:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :goto_0
    if-eqz v0, :cond_1

    .line 259
    sget-object v1, Lcom/burstly/lib/service/ServerConfigurationService;->LOG:Lcom/burstly/lib/util/LoggerExt;

    sget-object v2, Lcom/burstly/lib/service/ServerConfigurationService;->TAG:Ljava/lang/String;

    const-string v3, "Loaded saved configuration {0} from fs."

    const/4 v4, 0x1

    new-array v4, v4, [Ljava/lang/Object;

    aput-object v0, v4, v5

    invoke-virtual {v1, v2, v3, v4}, Lcom/burstly/lib/util/LoggerExt;->logDebug(Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    .line 260
    sget-object v1, Lcom/burstly/lib/service/ServerConfigurationService;->CONFIGURATION_DATA:Ljava/util/HashMap;

    invoke-virtual {v1, v0}, Ljava/util/HashMap;->putAll(Ljava/util/Map;)V

    .line 261
    sput-boolean v5, Lcom/burstly/lib/service/ServerConfigurationService;->sLoadConfig:Z

    .line 264
    iget-object v1, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->val$configurator:Ljava/util/concurrent/ThreadPoolExecutor;

    iget-object v2, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->val$loadConfig:Ljava/lang/Runnable;

    invoke-virtual {v1, v2}, Ljava/util/concurrent/ThreadPoolExecutor;->execute(Ljava/lang/Runnable;)V

    .line 268
    :goto_1
    return-void

    .line 257
    .end local v0           #saved:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_0
    const/4 v0, 0x0

    goto :goto_0

    .line 266
    .restart local v0       #saved:Ljava/util/Map;,"Ljava/util/Map<Ljava/lang/String;Ljava/lang/Object;>;"
    :cond_1
    iget-object v1, p0, Lcom/burstly/lib/service/ServerConfigurationService$1;->val$loadConfig:Ljava/lang/Runnable;

    invoke-interface {v1}, Ljava/lang/Runnable;->run()V

    goto :goto_1
.end method
